﻿@model List<OAWeb.Models.ScoreEdit>

@{
    ViewBag.Title = "ListByScore2";
}

<h2>成绩录入</h2>

<p>
    @Html.ActionLink("新建", "Create")
</p>
@using (Html.BeginForm())
{
    <table class="table">
        <tr>
            <th>
                @Html.HiddenFor(model => model[0].StudentID)
                @Html.HiddenFor(model => model[0].ID)
            </th>
            <th>
                姓名
            </th>
            <th>
               考试ID
            </th>
            <th>
               科目
            </th>
            <th>
                分数
            </th>
            
            <th></th>
        </tr>

        @for (int i = 0; i < Model.Count(); i++)
        {
            <tr>
                <td>
                    @Html.HiddenFor(modelItem => Model[i].StudentID)
                    @Html.HiddenFor(modelItem => Model[i].ID)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => Model[i].StuName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => Model[i].ExamID)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => Model[i].CourseName)
                </td>
                <td>
                    @Html.EditorFor(modelItem => Model[i].Score)
                </td>
                

            </tr>
        }

    </table>
    <input type="submit" value="Update" />
}